//
//  WDNariveAdView.m
//  WDPolymerizeSDK
//
//  Created by little People on 2023/6/1.
//

#import "WDNariveAdView.h"
#import "WDSourceManager.h"

@implementation WDNariveAdView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self){
//        self.backgroundColor = [UIColor colorWithRed:45/255.0 green:53/255.0 blue:61/255.0 alpha:1];
//        [self initUI];
        
    }
    return self;
}

- (void)initUI
{
    UIButton *closeButton = [[UIButton alloc] initWithFrame:CGRectMake(self.frame.size.width-50, 10, 40, 40)];
//    [closeButton setTitle:@"close" forState:UIControlStateNormal];
    [closeButton setBackgroundImage:[WDSourceManager WDImageWithName:@"close"] forState:UIControlStateNormal];
    [closeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
//    [closeButton addTarget:self action:@selector(closeAdView:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:closeButton];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
